package com.lemobar.pay.model.alipay.request;

import com.lemobar.pay.constants.AliPayConstants;
import com.lemobar.pay.enums.AliPayMethodEnum;
import com.lemobar.pay.model.alipay.ExtendParams;
import com.lemobar.pay.model.alipay.GoodsDetail;
import lombok.Data;

/**
 * 支付宝 请求
 * alipay.trade.wap.pay(手机网站支付接口2.0)
 * <a href="https://opendocs.alipay.com/open/02ivbs?scene=21">手机网站支付接口2.0</a>
 */
@Data
public class AliPayTradeWapPayRequest {
    private String appId;
    private String method = AliPayMethodEnum.ALIPAY_TRADE_WAP_PAY.getCode();
    private String format;
    private String returnUrl;
    private String charset = AliPayConstants.CHARSET_UTF8_LOWER;
    private String signType = AliPayConstants.SIGN_TYPE_RSA2;
    private String sign;
    private String timestamp;
    private String version = AliPayConstants.API_VERSION;
    private String notifyUrl;
    private String appAuthToken;
    private String bizContent;

    @Data
    public static class BizContent {
        private String outTradeNo;
        /**
         * 订单总金额。
         * 单位为元，精确到小数点后两位，取值范围：[0.01,100000000] 。
         */
        private Double totalAmount;
        private String subject;
        private String productCode = "QUICK_WAP_WAY";
        private String authToken;
        private String quitUrl;
        private GoodsDetail[] goodsDetail;
        private String timeExpire;

        private ExtendParams extendParams;

        private String businessParams;
        private String promoParams;
        private String passbackParams;

        private String merchantOrderNo;

    }
}
